import request from "@/utils/request";

// 获得次卡管理分页
export function getCardList(query) {
  return request({
    url: "/store/minor-card/page",
    method: "get",
    params: query,
  });
}

// 创建次卡管理
export function CreateCardManger(data) {
  return request({
    url: "/store/minor-card/create",
    method: "post",
    data: data,
  });
}

// 更新次卡管理
export function UpdateCardManger(data) {
  return request({
    url: "/store/minor-card/update",
    method: "PUT",
    data: data,
  });
}

// 删除次卡管理
export function DeleteCard(data) {
  return request({
    url: "/store/minor-card/delete",
    method: "DELETE",
    params: data,
  });
}

// 修改次卡状态
export function updateStatus(data) {
  return request({
    url: "/store/minor-card/updateStatus",
    method: "PUT",
    data: data,
  });
}

// 根据项目id获得次卡管理列表
// export function getMinorCardListByItemId(query) {
//   return request({
//     url: "/store/minor-card/getMinorCardListByItemId",
//     method: "get",
//     params: query,
//   });
// }


// 获得全部次卡类型
export function getAllCardType(query) {
  return request({
    url: "/store/minor-card-type/all",
    method: "get",
    params: query,
  });
}

// 创建次卡类型
export function CreateCardType(data) {
  return request({
    url: "/store/minor-card-type/create",
    method: "post",
    data: data,
  });
}

// 更新次卡类型
export function updateCardType(data) {
  return request({
    url: "/store/minor-card-type/update",
    method: "PUT",
    data: data,
  });
}

// 删除次卡类型
export function DeleteCardType(data) {
  return request({
    url: "/store/minor-card-type/delete",
    method: "DELETE",
    params: data,
  });
}